package com.zl.shirodemo.mapper;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zl.shirodemo.entity.SysUserRole;
import com.zl.shirodemo.entity.UserRole;

@Mapper
public interface SysUserRoleMapper {
    /**
     * delete by primary key
     * @param userRoleId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer userRoleId);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(SysUserRole record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(SysUserRole record);

    /**
     * select by primary key
     * @param userRoleId primary key
     * @return object by primary key
     */
    SysUserRole selectByPrimaryKey(Integer userRoleId);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(SysUserRole record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(SysUserRole record);
 
    List<UserRole> selectRolesByUserId(@Param("userId")Integer userId);
	
}